home *** CD-ROM | disk | FTP | other *** search
/ C & C++ Multimedia Cyber Classroom / C and C++ Multimedia Cyber Classroom (Prentice Hall) (1998).iso / src / fig16_23.jar / Ch16 / Fig16_23 / Fig16_23.cpp
C/C++ Source or Header  |  1997-11-10  |  305b  |  17 lines

  1. // Fig. 16.23: fig16_23.cpp
  2. // Using atol
  3. #include <iostream.h>
  4. #include <stdlib.h>
  5.  
  6. int main()
  7. {
  8.    long l = atol( "1000000" );
  9.  
  10.    cout << "The string \"1000000\" converted to long is " << l
  11.         << "\nThe converted value divided by 2 is " << l / 2 
  12.         << endl;
  13.    return 0;
  14. }
  15.  
  16.  
  17.